<?php get_header(); ?>
<!-- Content -->
<div id="content" class="wrap">
  <!-- mt -->
  <div class="mt">
    <!-- slide left -->
    <div class="hl bor left">
      <div id="focus">
      <?php 
	  query_posts('cat=13&showposts=6'); //cat是要调用的分类ID,showposts是需要显示的文章数量
	  ?>
        <!-- slide title -->
        <div class="hd">
          <div class="focus-title" id="focus-title"> 
          <?php while (have_posts()) : the_post(); ?>
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> 
          <?php endwhile; ?>
          </div>
        </div>
        <!-- slide img -->
        <div class="focus-bar-box" id="focus-bar-box">
          <ul class="focus-bar">
          <?php while (have_posts()) : the_post(); ?>
            <li><a href="<?php the_permalink(); ?>"><img src="<?php echo catch_that_image() ?>"></a></li>
          <?php endwhile; wp_reset_query(); ?>
          </ul>
        </div>
        <!-- slide list -->
        <div class="ft">
          <div class="ftbg"></div>
          <div id="focus-num" class="change"> 
            <a class=""></a> 
            <a class=""></a> 
            <a class=""></a> 
            <a class=""></a> 
            <a class=""></a> 
            <a class=""></a> 
          </div>
        </div>
      </div>
    </div>
    <!-- mid -->
    <div class="hm left">
      <h3 class="bom">专题推荐</h3>
      <ul>
      <?php  //获取置顶文章
		$sticky = get_option('sticky_posts'); /* 获取所有置顶文章 */
		rsort( $sticky );  /* 对这些文章排序, 日期最新的在最上 */
		$sticky = array_slice( $sticky, 0, 15); /* 获取15篇文章 */
		query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) );  /* 输出这些文章 */
		if (have_posts()) : /* 主循环 */
		while (have_posts()) : the_post();
	 ?>
        <li>
        <a href="<?php the_permalink(); ?>"  title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a>        </li>
        <?php endwhile; ?>
        <?php endif; ?>
      </ul>
    </div>
    <!-- right -->
    <div class="hr right">
      <div class="ddt bom">
        <a href="#"><i class="icon1"></i>喜欢</a>
        <a href="#"><i class="icon2"></i>收藏</a>
        <a href="#"><i class="icon3"></i>投稿</a>
      </div>
      <div class="bulletin bom bt">
      <?php 
	  query_posts('cat=16&showposts=1'); //cat是要调用的分类ID,showposts是需要显示的文章数量
	  ?>
        <?php while (have_posts()) : the_post(); ?>
        <?php the_excerpt(); ?>
         <?php endwhile; wp_reset_query(); ?>
      </div>
      <div class="ad bt"><a href=""></a></div>
    </div>
  </div>
  <!-- main -->
  <div class="main">
    <h3 class="wz bom">文章阅读</h3>
    <!-- Blog Post -->
    <!-- new post -->
    <?php //最新文章列表中排除置顶文章
	$post_num = 10; /* 显示文章的数量. */
	$sticky = get_option( 'sticky_posts' ); /* 获取所有置顶文章 */
	$args=array(
	'post_status' => 'publish',
	'paged' => $paged,
	'caller_get_posts' => 1,  /* 忽略sticky_posts，不置顶，但是输出置顶文章 */
	'post__not_in' => $sticky,/* 排除置顶文章，不输出 */
	'category__not_in' => array(14,13,16), /* 14,13,16即为不想显示的分类ID，多个用半角逗号隔开 */
	'posts_per_page' => $post_num
	);
	query_posts($args);
	/* 主循环 */
	if ( have_posts() ) : while ( have_posts() ) : the_post();
	?>
    <div class="list bom">
      <!-- post img -->
      <div class="img"><img onload="AutoImage(295,0,this)" src="<?php echo catch_that_image() ?>"/></div>
      <div class="post">
        <h4 class="title">
          <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
        </h4>
        <div class="sub">
          <i class="user"></i><span> <?php the_author(); ?></span>
          <i class="date"></i><span><?php the_time('Y.n.j') ?></span>
          <i class="chat"></i><span><?php comments_popup_link('0', '1', '%', '', '评论已关闭'); ?></span>
          <i class="tag"></i><span><?php the_tags((' '), '、'); ?></span>
        </div>
        <p class="summary">
		<?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 320,"……"); ?>
        </p>
        <div class="read right"><a href="<?php the_permalink(); ?>">继续阅读</a></div>
      </div>
    </div>
    <?php endwhile; else: endif; wp_reset_query();?> 
    <!-- page style -->
    <div class="paging">
    <?php par_pagenavi(9); ?> 
    </div>  
    </div>
<?php get_sidebar(); ?>
<!-- link -->
<div class="link wrap">
<?php if (function_exists(wpjam_blogroll)) wpjam_blogroll();?>
</div>
<?php get_footer(); ?>